/*
 *modified on March 7, 2011
 */
void parse(void){
    initparse();
	getsymbol();

	if(alpha != 350){
		bug=3;
		reportbug();
		return;
	}
	else{
		shift();
		getsymbol();

		while(!bug){
			if(eos){
				if(top == 0 && sigma == 400){
					break;  
				}          
				else{
					reduce();    
				}
			} 
			else{
				switch((int)c1[c1i][c1j] ){
					case 0:
						shift();
						getsymbol();
						break;
					case 1:
						reduce();
						break;
					default :
						bug = 10 + (int)c1[c1i][c1j];
				}
			}
		A:                
		}
		B:
		if(bug){
			reportbug();
        }
		else{
			closeout();    
		}
	}
}
